fn main() {
    
    let a = Action::EXIT;
    let b = Action::MOVE(500, 500);
    let c = Action::ATTRACK {
        name: String::from("boxing"),
        power: 500,
    };
    println!("{:#?},{:#?},{:#?}", a, b, c);

    // unpack
    if let Action::MOVE(x, y) = b {
        println!("x: {},y: {}", x, y);
    }

    if let Action::ATTRACK { name, power } = c {
        println!("name: {}, name: {}", name, power);
    }
}

#[derive(Debug)]
enum Action {
    EXIT,
    MOVE(i32, i32),
    ATTRACK { name: String, power: i32 },
}
